{% extends 'dashboard/base.html' %}

{% block body %}

        <div class="row justify-content-md-center">
            <div class="col-8">
                <div class="card">
                    <div class="card-body">
                        <div class="d-md-flex align-items-center">
                            <h1 class="card-title">Upload Reports</h1>
                        </div>
                        <br>
                        <div class="card">
                            <div class="form-group">
                                <form class="form-horizontal" method="POST" enctype="multipart/form-data"
                                      action="{% url 'networkscanners:xml_upload' %}">{% csrf_token %}
                                    <div class="card-body">
                                        <h5 class="card-title"></h5>
                                        <div class="form-group row">
                                            <label class="col-md-3 m-t-15">Project</label>
                                            <div class="col-md-9">
                                                <select id="project_id" name="project_id"
                                                        class="select2 form-control custom-select"
                                                        style="width: 100%; height:36px;">
                                                    {% for data in all_project %}
                                                    <option value="{{data.uu_id}}">{{data.project_name}}</option>
                                                    {% endfor %}
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-md-3 m-t-15">Scanner</label>
                                            <div class="col-md-9">
                                                <select id="scanner" name="scanner"
                                                        class="select2 form-control custom-select"
                                                        style="width: 100%; height:36px;">
                                                    <option value="openvas">OpenVAS</option>
                                                    <option value="nessus">Nessus</option>
                                                    <option value="nmap">Nmap</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-sm-3 control-label col-form-label">Scan URL/IP:</label>
                                            <div class="col-sm-9">
                                               <input type="text" name="scan_url" class="form-control"
                                           placeholder="Scan URL/IP"/>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-md-3">XML/HTML File :</label>
                                            <div class="col-md-9">
                                                 <input type="file" name="xmlfile">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-success">Save</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


{% endblock %}
